There are two directories: templates and webstats.

In the webstats directory, all kind of gfx, static-html, etc. ... is stored.
The templates directory contains the html-files with tags/placeholders.

The Webserver is looking for tags like:

&lt;--USERCOUNT--&gt;		//current amount of users in the hub
&lt;--SHARESIZE--&gt;		//Sharesize in GB
&lt;--ACTIP--&gt;			//actual hub-adress
&lt;--SHARELIMIT--&gt;		// Set sharelimit in the hubsoftware
&lt;--SHARELUNIT--&gt;		//unit of the set limit
&lt;--MINSLOTS--&gt;		//minimum open slots set in Hubsoftware
&lt;--MAXHUBS--&gt;			//max. number of simultaneous hubs 
&lt;--MAXNOCLIENTS--&gt;		//max. Number of allowed Users on the hu
&lt;--CHATLINE0--&gt;		//most recent chat-line
...				//former chat-lines
..				//former chat-lines
&lt;--CHATLINE14--&gt;		//oldest chat-line


In common html-editors its enough to insert a text/tag like <--USERCOUNT-->. But its important, that in the real souce of the page, the < is replaced by &lt; and > is replaced by &gt;


If a request of a client occurs, the webserver parses all html-files in the templates directory and puts the result in webstats. Therefore it would be possible to use the stuff in webstats as cache.


One possible - and maybe common - scenario:

You run a regular webserver on port 80. And you want to include some statistics into the existing page. The most simple way is to build on a frameset. That means: Only a Frame of the regular Webserver redirects to the Hub-Webserver. Realized by doing (if hub-webserver runs on port 8080:

<FRAME ...src="127.0.0.1:8080" ....>

This will insert the page index.html (in the webstats directory) into your common Homepage. Inside the frame the user can navigate in the known way.

But take care: every file, that shall contain Live-Statistics, needs to be placed in the templates-directory. The Hub-webserver copies them on client-browser-request to the webstats directory. So a link must go there.

If this explanation isnt enough, just have a look at the provided example - and never mind to ask the dev-team of ptokax.